<html>
<head><title>iKnow! API - AppEngine</title></head>
<body style="margin:30px">
	<h3>Welcome to the Python/AppEngine Wrapper for the iKnow! API</h3>
	<b>Resources</b>
	<ul style="font-size:15px">
		<li><a href="http://code.google.com/p/iknow-api-appengine/">Get the code</a>
		<li><a href="http://www.iknow.co.jp/">iKnow!</a>
		<li><a href="http://developer.iknow.co.jp/docs">iKnow! API</a>
		<li><a href="http://code.google.com/appengine/">Google AppEngine</a>
	</ul>
	<b>Example</b>
	<ul style="font-size:15px">
		<li>Code:
			<div style="font-family:courier; margin:10px; border-left: 1px solid #666; padding:8px 10px;">
				from iknow import iKnow<br><br>
				iknow = iKnow()<br>
				profile = iknow.user_profile("geechuang")<br>
				avatar = iKnow.find_children(profile,'foaf:depiction')[0]["nodeValue"]["attributes"]["rdf:resource"]<br>
				name = iKnow.find_children(profile,'foaf:name')[0]["nodeValue"]["value"]<br>
				gender = iKnow.find_children(profile,'foaf:gender')[0]["nodeValue"]["value"]<br>
				homepage = iKnow.find_children(profile,'foaf:homepage')[0]["nodeValue"]["attributes"]["rdf:resource"]<br>
				contacts = iKnow.find_children(profile,'foaf:knows')<br>
				contact_names = []<br>
				for contact in contacts:<br>
				&nbsp;&nbsp;&nbsp;person = iKnow.find_children(contact,'foaf:Person')[0]<br>
				&nbsp;&nbsp;&nbsp;contact_names.append(iKnow.find_children(person,'foaf:name')[0]["nodeValue"]["value"])<br>
			</div>
		<li>Output:
			<div style="font-family:courier; margin:10px">
				<img src="{{avatar}}" style="border:1px solid #666; padding:2px"><br>
				Name = {{name}}<br>
				Gender = {{gender}}<br>
				Homepage = {{homepage}}<br>
				Knows {{numcontacts}} people:
				{% for contact in contacts %}
				<div style="margin-left:20px">
				- {{ contact }}
				</div>
				{% endfor %}
			</div>
	</ul>
</body>
</html>